package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;

/**
 * Created by root on 17-9-19.
 */
@Entity
@Table(name = "fun_items", schema = "", catalog = "")
public class FunItemsEntity extends IAcross
{
	private int itemId;
	private int funId;
	private int priId;
	private String type;
	private int opera;

	@Id
	@Column(name = "item_id", nullable = false)
	public int getItemId()
	{
		return itemId;
	}

	public void setItemId(int itemId)
	{
		this.itemId = itemId;
	}

	@Basic
	@Column(name = "fun_id", nullable = false)
	public int getFunId()
	{
		return funId;
	}

	public void setFunId(int funId)
	{
		this.funId = funId;
	}

	@Basic
	@Column(name = "pri_id", nullable = false)
	public int getPriId()
	{
		return priId;
	}

	public void setPriId(int priId)
	{
		this.priId = priId;
	}

	@Basic
	@Column(name = "type", nullable = false, length = 9)
	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	@Basic
	@Column(name = "opera", nullable = false)
	public int getOpera()
	{
		return opera;
	}

	public void setOpera(int opera)
	{
		this.opera = opera;
	}

	@Override
	public boolean equals(Object o)
	{
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		FunItemsEntity that = (FunItemsEntity) o;

		if (itemId != that.itemId) return false;
		if (funId != that.funId) return false;
		if (priId != that.priId) return false;
		if (opera != that.opera) return false;
		if (type != null ? !type.equals(that.type) : that.type != null) return false;

		return true;
	}

	@Override
	public int hashCode()
	{
		int result = itemId;
		result = 31 * result + funId;
		result = 31 * result + priId;
		result = 31 * result + (type != null ? type.hashCode() : 0);
		result = 31 * result + opera;
		return result;
	}
}
